const app = getApp();
Page({
  data: {
    version: 0,
  },
  onLoad: function(options) {
    this.setData({
      version: app.globalData.version
    })
  },
  open: function(e) {
    this.setData({
      modalName: e.currentTarget.dataset.what
    })
  },
  hideModal(e) {
    this.setData({
      modalName: null
    })
  },
  none: function() {

  },
  // 
  clearStorage: function() {
    wx.clearStorage({
      success: function() {
        app.showToast('清除成功，下次启动时生效！', 'none', '', 2000, false)
      },
      fail: function() {
        app.showToast('清除失败！', 'none', '', 2000, false)
      }
    })
  }
})